<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>微信登录</title>

        <!--引入 vue -->
        <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
        <!--引入 axios -->
        <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    </head>
    <body>
        <h1>Gitee第三方登录</h1>

        <div id="vue-app">
            <button @click="getUrl">我是微信图标</button>
        </div>

    </body>

    <script type="text/javascript">
        let vue = new Vue({
            el: "#vue-app",
            methods: {
                getUrl() {
                    axios.get("http://localhost:20090/wechat/url")
                        .then((resp) => {
                            let url = resp.data.data;
                            window.open(url,"_blank");
                        })
                }
            }
        });
    </script>
</html>